﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.controllers.world {
    import flash.events.*;
    import net.wooga.pets.events.*;
    import net.wooga.pets.interfaces.*;
    import net.wooga.pets.constants.*;
    import org.robotlegs.mvcs.*;
    import net.wooga.pets.models.world.*;

    public class HandleNextInQueueCommand extends Command {

		[Inject]
        public var event:InfoEvent;
		[Inject]
        public var world:WorldModel;

        override public function execute():void{
            var _local1:ITreatable = this.world.building.getNextInQueue(this.event.id);
            if (_local1){
                _local1.moveToNextTarget(this.event.id);
                dispatch(new Event(EventConstants.UPDATE_MORE_PETS_ARROW));
            };
        }

    }
}//package net.wooga.pets.controllers.world 
